<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Elasticsearch 快照与恢复功能解析 | 数据安全与灾难恢复</title>
    <link rel="stylesheet" href="https://cdn.staticfile.org/font-awesome/6.4.0/css/all.min.css">
    <link rel="stylesheet" href="https://cdn.staticfile.org/tailwindcss/2.2.19/tailwind.min.css">
    <link href="https://fonts.googleapis.com/css2?family=Noto+Serif+SC:wght@400;500;600;700&family=Noto+Sans+SC:wght@300;400;500;700&display=swap" rel="stylesheet">
    <script src="https://cdn.jsdelivr.net/npm/mermaid@latest/dist/mermaid.min.js"></script>
    <style>
        body {
            font-family: 'Noto Sans SC', Tahoma, Arial, Roboto, "Droid Sans", "Helvetica Neue", "Droid Sans Fallback", "Heiti SC", "Hiragino Sans GB", Simsun, sans-serif;
            line-height: 1.8;
            color: #333;
        }
        h1, h2, h3, h4, .serif {
            font-family: 'Noto Serif SC', serif;
        }
        .hero-gradient {
            background: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 100%);
        }
        .code-block {
            background: #2d3748;
            border-left: 4px solid #4fd1c5;
        }
        .feature-card:hover {
            transform: translateY(-5px);
            box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
        }
        .mermaid-tooltip {
            background: white;
            padding: 8px 16px;
            border-radius: 4px;
            box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
        }
    </style>
</head>
<body class="bg-gray-50">
    <!-- Hero Section -->
    <section class="hero-gradient text-white py-20 px-4 md:px-0">
        <div class="container mx-auto max-w-5xl">
            <div class="flex flex-col md:flex-row items-center">
                <div class="md:w-1/2 mb-10 md:mb-0">
                    <span class="inline-block px-3 py-1 bg-white bg-opacity-20 rounded-full text-sm font-medium mb-4"><i class="fas fa-shield-alt mr-2"></i>数据安全</span>
                    <h1 class="text-4xl md:text-5xl font-bold leading-tight mb-6">Elasticsearch 快照与恢复功能</h1>
                    <p class="text-xl opacity-90 mb-8">保障数据安全与实现灾难恢复的核心技术解析</p>
                    <div class="flex space-x-4">
                        <a href="#snapshot" class="px-6 py-3 bg-white text-indigo-700 font-medium rounded-lg hover:bg-opacity-90 transition duration-300 flex items-center">
                            <i class="fas fa-camera mr-2"></i> 快照功能
                        </a>
                        <a href="#restore" class="px-6 py-3 bg-indigo-800 bg-opacity-30 text-white font-medium rounded-lg hover:bg-opacity-50 transition duration-300 flex items-center">
                            <i class="fas fa-redo mr-2"></i> 恢复功能
                        </a>
                    </div>
                </div>
                <div class="md:w-1/2 flex justify-center">
                    <div class="relative w-full max-w-md">
                        <div class="absolute -top-6 -left-6 w-32 h-32 bg-yellow-400 rounded-full opacity-20"></div>
                        <div class="absolute -bottom-6 -right-6 w-32 h-32 bg-purple-400 rounded-full opacity-20"></div>
                        <div class="relative bg-white bg-opacity-10 backdrop-filter backdrop-blur-lg rounded-2xl p-8 border border-white border-opacity-20 shadow-xl">
                            <div class="flex items-center justify-between mb-6">
                                <div class="flex items-center">
                                    <div class="w-3 h-3 bg-red-500 rounded-full mr-2"></div>
                                    <div class="w-3 h-3 bg-yellow-500 rounded-full mr-2"></div>
                                    <div class="w-3 h-3 bg-green-500 rounded-full"></div>
                                </div>
                                <div class="text-xs text-white text-opacity-70">GET /_snapshot/my_backup</div>
                            </div>
                            <pre class="text-sm text-white font-mono overflow-x-auto">{
  "snapshots": [
    {
      "snapshot": "snapshot_1",
      "indices": ["index1","index2"],
      "state": "SUCCESS",
      "start_time": "2023-06-01T10:00:00Z",
      "end_time": "2023-06-01T10:02:30Z"
    }
  ]
}</pre>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </section>

    <!-- Overview Section -->
    <section class="py-16 px-4 md:px-0 bg-white">
        <div class="container mx-auto max-w-5xl">
            <div class="text-center mb-16">
                <h2 class="text-3xl font-bold text-gray-800 mb-4">数据保护的核心机制</h2>
                <p class="text-lg text-gray-600 max-w-3xl mx-auto">Elasticsearch 的 <span class="font-semibold text-indigo-600">Snapshot</span> 和 <span class="font-semibold text-purple-600">Restore</span> 功能是保障数据安全和灾难恢复的重要手段，尤其是在大规模生产环境中。</p>
            </div>
            
            <div class="grid md:grid-cols-2 gap-8 mb-16">
                <div class="bg-gray-50 p-8 rounded-xl border border-gray-100 feature-card transition duration-300">
                    <div class="w-16 h-16 bg-indigo-100 rounded-xl flex items-center justify-center mb-6 text-indigo-600">
                        <i class="fas fa-camera fa-2x"></i>
                    </div>
                    <h3 class="text-xl font-bold text-gray-800 mb-3">Snapshot 快照功能</h3>
                    <p class="text-gray-600 mb-4">创建索引数据的备份，保存索引的全部或部分数据，并存储在指定的存储库中。支持文件系统、S3、Azure Blob、Google Cloud Storage 等多种存储类型。</p>
                    <ul class="space-y-2 text-gray-600">
                        <li class="flex items-start">
                            <i class="fas fa-check-circle text-indigo-500 mt-1 mr-2"></i>
                            <span>增量备份，节省存储空间</span>
                        </li>
                        <li class="flex items-start">
                            <i class="fas fa-check-circle text-indigo-500 mt-1 mr-2"></i>
                            <span>捕获索引数据、元数据和配置</span>
                        </li>
                        <li class="flex items-start">
                            <i class="fas fa-check-circle text-indigo-500 mt-1 mr-2"></i>
                            <span>支持跨集群数据迁移</span>
                        </li>
                    </ul>
                </div>
                
                <div class="bg-gray-50 p-8 rounded-xl border border-gray-100 feature-card transition duration-300">
                    <div class="w-16 h-16 bg-purple-100 rounded-xl flex items-center justify-center mb-6 text-purple-600">
                        <i class="fas fa-redo fa-2x"></i>
                    </div>
                    <h3 class="text-xl font-bold text-gray-800 mb-3">Restore 恢复功能</h3>
                    <p class="text-gray-600 mb-4">从快照中恢复数据的过程，可以将数据恢复到原始集群，也可以恢复到不同的集群或索引。支持选择性恢复和全局状态恢复。</p>
                    <ul class="space-y-2 text-gray-600">
                        <li class="flex items-start">
                            <i class="fas fa-check-circle text-purple-500 mt-1 mr-2"></i>
                            <span>完整恢复或部分恢复</span>
                        </li>
                        <li class="flex items-start">
                            <i class="fas fa-check-circle text-purple-500 mt-1 mr-2"></i>
                            <span>数据丢失或损坏后的恢复</span>
                        </li>
                        <li class="flex items-start">
                            <i class="fas fa-check-circle text-purple-500 mt-1 mr-2"></i>
                            <span>环境迁移和数据回滚</span>
                        </li>
                    </ul>
                </div>
            </div>
            
            <!-- Mermaid Diagram -->
            <div class="bg-white p-8 rounded-xl border border-gray-100 shadow-sm">
                <h3 class="text-xl font-bold text-gray-800 mb-6 flex items-center">
                    <i class="fas fa-project-diagram text-indigo-500 mr-3"></i>
                    <span>快照与恢复工作流程</span>
                </h3>
                <div class="mermaid">
                    flowchart TD
                    A[定义存储库] --> B[创建快照]
                    B --> C[存储到备份仓库]
                    C --> D[选择快照]
                    D --> E[恢复数据]
                    E --> F[恢复到集群]
                    
                    subgraph 快照流程
                    A
                    B
                    C
                    end
                    
                    subgraph 恢复流程
                    D
                    E
                    F
                    end
                    
                    style 快照流程 fill:#f0f9ff,stroke:#3b82f6
                    style 恢复流程 fill:#f5f3ff,stroke:#8b5cf6
                </div>
            </div>
        </div>
    </section>

    <!-- Snapshot Section -->
    <section id="snapshot" class="py-16 px-4 md:px-0 bg-gray-50">
        <div class="container mx-auto max-w-5xl">
            <div class="flex items-center mb-10">
                <div class="w-12 h-12 bg-indigo-100 rounded-lg flex items-center justify-center mr-6 text-indigo-600">
                    <i class="fas fa-camera fa-lg"></i>
                </div>
                <h2 class="text-3xl font-bold text-gray-800">1. Snapshot 快照功能</h2>
            </div>
            
            <div class="bg-white p-8 rounded-xl shadow-sm mb-10">
                <p class="text-lg text-gray-700 mb-6">快照（Snapshot）是 Elasticsearch 提供的一种机制，用于创建索引数据的备份。快照保存了索引的全部或部分数据，并存储在指定的存储库中。快照可以用于数据恢复、迁移或备份管理。</p>
                
                <h3 class="text-xl font-bold text-gray-800 mb-4 flex items-center">
                    <i class="fas fa-cogs text-indigo-500 mr-3"></i>
                    <span>工作原理</span>
                </h3>
                
                <div class="grid md:grid-cols-2 gap-8 mb-8">
                    <div>
                        <h4 class="font-semibold text-gray-800 mb-3 flex items-center">
                            <span class="w-6 h-6 bg-indigo-500 text-white rounded-full flex items-center justify-center mr-2">1</span>
                            <span>创建快照</span>
                        </h4>
                        <div class="code-block text-gray-200 rounded-lg p-4 mb-4 text-sm overflow-x-auto">
                            <pre>PUT /_snapshot/my_backup/snapshot_1
{
  "indices": "index1,index2",
  "ignore_unavailable": true,
  "include_global_state": true
}</pre>
                        </div>
                        <ul class="text-gray-700 space-y-2">
                            <li class="flex items-start">
                                <i class="fas fa-circle text-xs text-indigo-500 mt-2 mr-2"></i>
                                <span><span class="font-medium">my_backup</span> 是存储库的名称</span>
                            </li>
                            <li class="flex items-start">
                                <i class="fas fa-circle text-xs text-indigo-500 mt-2 mr-2"></i>
                                <span><span class="font-medium">snapshot_1</span> 是快照的名称</span>
                            </li>
                            <li class="flex items-start">
                                <i class="fas fa-circle text-xs text-indigo-500 mt-2 mr-2"></i>
                                <span><span class="font-medium">indices</span> 指定了需要备份的索引</span>
                            </li>
                            <li class="flex items-start">
                                <i class="fas fa-circle text-xs text-indigo-500 mt-2 mr-2"></i>
                                <span><span class="font-medium">ignore_unavailable</span> 表示忽略不可用的索引</span>
                            </li>
                        </ul>
                    </div>
                    
                    <div>
                        <h4 class="font-semibold text-gray-800 mb-3 flex items-center">
                            <span class="w-6 h-6 bg-indigo-500 text-white rounded-full flex items-center justify-center mr-2">2</span>
                            <span>恢复快照</span>
                        </h4>
                        <div class="code-block text-gray-200 rounded-lg p-4 mb-4 text-sm overflow-x-auto">
                            <pre>POST /_snapshot/my_backup/snapshot_1/_restore
{
  "indices": "index1",
  "ignore_unavailable": true,
  "include_global_state": true
}</pre>
                        </div>
                        <ul class="text-gray-700 space-y-2">
                            <li class="flex items-start">
                                <i class="fas fa-circle text-xs text-indigo-500 mt-2 mr-2"></i>
                                <span><span class="font-medium">snapshot_1</span> 是要恢复的快照名称</span>
                            </li>
                            <li class="flex items-start">
                                <i class="fas fa-circle text-xs text-indigo-500 mt-2 mr-2"></i>
                                <span><span class="font-medium">indices</span> 指定了要恢复的索引</span>
                            </li>
                            <li class="flex items-start">
                                <i class="fas fa-circle text-xs text-indigo-500 mt-2 mr-2"></i>
                                <span><span class="font-medium">include_global_state</span> 指定是否包括集群的全局状态</span>
                            </li>
                        </ul>
                    </div>
                </div>
                
                <h4 class="font-semibold text-gray-800 mb-3 flex items-center">
                    <span class="w-6 h-6 bg-indigo-500 text-white rounded-full flex items-center justify-center mr-2">3</span>
                    <span>存储格式</span>
                </h4>
                <p class="text-gray-700 mb-6">快照会以增量的形式存储，仅记录自上一个快照以来的数据变更，这样可以节省存储空间和提高备份效率。</p>
            </div>
            
            <h3 class="text-xl font-bold text-gray-800 mb-6 flex items-center">
                <i class="fas fa-lightbulb text-indigo-500 mr-3"></i>
                <span>应用场景</span>
            </h3>
            
            <div class="grid md:grid-cols-2 gap-6">
                <div class="bg-white p-6 rounded-lg border border-gray-100 hover:border-indigo-200 transition duration-300 shadow-sm hover:shadow-md">
                    <div class="flex items-start mb-3">
                        <div class="w-10 h-10 bg-indigo-100 rounded-lg flex items-center justify-center mr-4 text-indigo-600 flex-shrink-0">
                            <i class="fas fa-database"></i>
                        </div>
                        <h4 class="font-semibold text-gray-800">数据备份</h4>
                    </div>
                    <p class="text-gray-600">定期创建快照可以防止数据丢失，确保在系统崩溃或数据损坏时能够恢复数据。</p>
                </div>
                
                <div class="bg-white p-6 rounded-lg border border-gray-100 hover:border-indigo-200 transition duration-300 shadow-sm hover:shadow-md">
                    <div class="flex items-start mb-3">
                        <div class="w-10 h-10 bg-indigo-100 rounded-lg flex items-center justify-center mr-4 text-indigo-600 flex-shrink-0">
                            <i class="fas fa-fire-extinguisher"></i>
                        </div>
                        <h4 class="font-semibold text-gray-800">灾难恢复</h4>
                    </div>
                    <p class="text-gray-600">在发生灾难或严重故障时，使用快照可以恢复到正常状态，减轻故障带来的影响。</p>
                </div>
                
                <div class="bg-white p-6 rounded-lg border border-gray-100 hover:border-indigo-200 transition duration-300 shadow-sm hover:shadow-md">
                    <div class="flex items-start mb-3">
                        <div class="w-10 h-10 bg-indigo-100 rounded-lg flex items-center justify-center mr-4 text-indigo-600 flex-shrink-0">
                            <i class="fas fa-exchange-alt"></i>
                        </div>
                        <h4 class="font-semibold text-gray-800">迁移和升级</h4>
                    </div>
                    <p class="text-gray-600">可以将数据从一个集群迁移到另一个集群，或在升级集群时使用快照进行数据迁移。</p>
                </div>
                
                <div class="bg-white p-6 rounded-lg border border-gray-100 hover:border-indigo-200 transition duration-300 shadow-sm hover:shadow-md">
                    <div class="flex items-start mb-3">
                        <div class="w-10 h-10 bg-indigo-100 rounded-lg flex items-center justify-center mr-4 text-indigo-600 flex-shrink-0">
                            <i class="fas fa-flask"></i>
                        </div>
                        <h4 class="font-semibold text-gray-800">测试和开发</h4>
                    </div>
                    <p class="text-gray-600">在进行测试或开发时，可以使用快照创建数据副本，避免对生产数据造成影响。</p>
                </div>
            </div>
        </div>
    </section>

    <!-- Restore Section -->
    <section id="restore" class="py-16 px-4 md:px-0 bg-white">
        <div class="container mx-auto max-w-5xl">
            <div class="flex items-center mb-10">
                <div class="w-12 h-12 bg-purple-100 rounded-lg flex items-center justify-center mr-6 text-purple-600">
                    <i class="fas fa-redo fa-lg"></i>
                </div>
                <h2 class="text-3xl font-bold text-gray-800">2. Restore 恢复功能</h2>
            </div>
            
            <div class="bg-gray-50 p-8 rounded-xl shadow-sm mb-10">
                <p class="text-lg text-gray-700 mb-6">恢复（Restore）是从快照中恢复数据的过程。恢复操作可以将数据恢复到原始集群，也可以恢复到不同的集群或索引。</p>
                
                <h3 class="text-xl font-bold text-gray-800 mb-4 flex items-center">
                    <i class="fas fa-cogs text-purple-500 mr-3"></i>
                    <span>工作原理</span>
                </h3>
                
                <div class="grid md:grid-cols-3 gap-6 mb-8">
                    <div>
                        <h4 class="font-semibold text-gray-800 mb-3 flex items-center">
                            <span class="w-6 h-6 bg-purple-500 text-white rounded-full flex items-center justify-center mr-2">1</span>
                            <span>选择快照</span>
                        </h4>
                        <p class="text-gray-700">选择要恢复的快照，从存储库中加载快照数据。</p>
                    </div>
                    
                    <div>
                        <h4 class="font-semibold text-gray-800 mb-3 flex items-center">
                            <span class="w-6 h-6 bg-purple-500 text-white rounded-full flex items-center justify-center mr-2">2</span>
                            <span>恢复索引</span>
                        </h4>
                        <p class="text-gray-700">恢复时可以选择恢复所有索引或特定的索引。可以将数据恢复到原始位置或新位置。</p>
                    </div>
                    
                    <div>
                        <h4 class="font-semibold text-gray-800 mb-3 flex items-center">
                            <span class="w-6 h-6 bg-purple-500 text-white rounded-full flex items-center justify-center mr-2">3</span>
                            <span>恢复过程</span>
                        </h4>
                        <p class="text-gray-700">恢复过程会重建索引的元数据和数据文件，并将其导入到集群中。</p>
                    </div>
                </div>
                
                <div class="code-block text-gray-200 rounded-lg p-4 mb-6 text-sm overflow-x-auto">
                    <pre>POST /_snapshot/my_backup/snapshot_1/_restore
{
  "indices": "index1",
  "ignore_unavailable": true,
  "include_global_state": false
}</pre>
                </div>
                
                <ul class="text-gray-700 space-y-2 mb-6">
                    <li class="flex items-start">
                        <i class="fas fa-circle text-xs text-purple-500 mt-2 mr-2"></i>
                        <span><span class="font-medium">index1</span> 是要恢复的索引名称</span>
                    </li>
                    <li class="flex items-start">
                        <i class="fas fa-circle text-xs text-purple-500 mt-2 mr-2"></i>
                        <span><span class="font-medium">include_global_state</span> 为 <span class="font-mono">false</span> 表示不恢复全局状态，仅恢复索引数据</span>
                    </li>
                </ul>
            </div>
            
            <h3 class="text-xl font-bold text-gray-800 mb-6 flex items-center">
                <i class="fas fa-lightbulb text-purple-500 mr-3"></i>
                <span>应用场景</span>
            </h3>
            
            <div class="grid md:grid-cols-3 gap-6">
                <div class="bg-purple-50 p-6 rounded-lg border border-purple-100 transition duration-300">
                    <h4 class="font-semibold text-gray-800 mb-3 flex items-center">
                        <i class="fas fa-undo text-purple-500 mr-2"></i>
                        <span>数据恢复</span>
                    </h4>
                    <p class="text-gray-600">在数据丢失或损坏后，使用恢复功能可以将数据恢复到正常状态。</p>
                </div>
                
                <div class="bg-purple-50 p-6 rounded-lg border border-purple-100 transition duration-300">
                    <h4 class="font-semibold text-gray-800 mb-3 flex items-center">
                        <i class="fas fa-truck-moving text-purple-500 mr-2"></i>
                        <span>环境迁移</span>
                    </h4>
                    <p class="text-gray-600">将数据从一个环境迁移到另一个环境时，可以使用恢复功能进行数据迁移。</p>
                </div>
                
                <div class="bg-purple-50 p-6 rounded-lg border border-purple-100 transition duration-300">
                    <h4 class="font-semibold text-gray-800 mb-3 flex items-center">
                        <i class="fas fa-history text-purple-500 mr-2"></i>
                        <span>数据回滚</span>
                    </h4>
                    <p class="text-gray-600">如果在数据更新或更改后出现问题，可以使用快照恢复到之前的状态。</p>
                </div>
            </div>
        </div>
    </section>

    <!-- Best Practices Section -->
    <section class="py-16 px-4 md:px-0 bg-gray-50">
        <div class="container mx-auto max-w-5xl">
            <div class="text-center mb-12">
                <h2 class="text-3xl font-bold text-gray-800 mb-4">最佳实践与注意事项</h2>
                <p class="text-lg text-gray-600 max-w-3xl mx-auto">使用快照和恢复功能时，遵循这些最佳实践可以确保数据安全和操作效率</p>
            </div>
            
            <div class="grid md:grid-cols-2 gap-8">
                <div class="bg-white p-8 rounded-xl shadow-sm">
                    <h3 class="text-xl font-bold text-gray-800 mb-6 flex items-center">
                        <i class="fas fa-check-circle text-green-500 mr-3"></i>
                        <span>推荐做法</span>
                    </h3>
                    
                    <ul class="space-y-5">
                        <li class="flex">
                            <div class="flex-shrink-0 mt-1">
                                <div class="w-8 h-8 bg-green-100 rounded-full flex items-center justify-center text-green-600 mr-4">
                                    <i class="fas fa-check"></i>
                                </div>
                            </div>
                            <div>
                                <h4 class="font-semibold text-gray-800 mb-1">定期快照</h4>
                                <p class="text-gray-600">根据业务需求设置合理的快照周期，确保关键数据有最新备份</p>
                            </div>
                        </li>
                        
                        <li class="flex">
                            <div class="flex-shrink-0 mt-1">
                                <div class="w-8 h-8 bg-green-100 rounded-full flex items-center justify-center text-green-600 mr-4">
                                    <i class="fas fa-check"></i>
                                </div>
                            </div>
                            <div>
                                <h4 class="font-semibold text-gray-800 mb-1">测试恢复流程</h4>
                                <p class="text-gray-600">定期测试恢复流程，确保在真正需要时能够顺利恢复数据</p>
                            </div>
                        </li>
                        
                        <li class="flex">
                            <div class="flex-shrink-0 mt-1">
                                <div class="w-8 h-8 bg-green-100 rounded-full flex items-center justify-center text-green-600 mr-4">
                                    <i class="fas fa-check"></i>
                                </div>
                            </div>
                            <div>
                                <h4 class="font-semibold text-gray-800 mb-1">版本兼容性</h4>
                                <p class="text-gray-600">确保快照和恢复操作在兼容的 Elasticsearch 版本之间进行</p>
                            </div>
                        </li>
                    </ul>
                </div>
                
                <div class="bg-white p-8 rounded-xl shadow-sm">
                    <h3 class="text-xl font-bold text-gray-800 mb-6 flex items-center">
                        <i class="fas fa-exclamation-triangle text-yellow-500 mr-3"></i>
                        <span>注意事项</span>
                    </h3>
                    
                    <ul class="space-y-5">
                        <li class="flex">
                            <div class="flex-shrink-0 mt-1">
                                <div class="w-8 h-8 bg-yellow-100 rounded-full flex items-center justify-center text-yellow-600 mr-4">
                                    <i class="fas fa-exclamation"></i>
                                </div>
                            </div>
                            <div>
                                <h4 class="font-semibold text-gray-800 mb-1">资源消耗</h4>
                                <p class="text-gray-600">快照和恢复操作会消耗集群资源，建议在低峰期执行</p>
                            </div>
                        </li>
                        
                        <li class="flex">
                            <div class="flex-shrink-0 mt-1">
                                <div class="w-8 h-8 bg-yellow-100 rounded-full flex items-center justify-center text-yellow-600 mr-4">
                                    <i class="fas fa-exclamation"></i>
                                </div>
                            </div>
                            <div>
                                <h4 class="font-semibold text-gray-800 mb-1">存储空间</h4>
                                <p class="text-gray-600">监控存储库的可用空间，避免因空间不足导致备份失败</p>
                            </div>
                        </li>
                        
                        <li class="flex">
                            <div class="flex-shrink-0 mt-1">
                                <div class="w-8 h-8 bg-yellow-100 rounded-full flex items-center justify-center text-yellow-600 mr-4">
                                    <i class="fas fa-exclamation"></i>
                                </div>
                            </div>
                            <div>
                                <h4 class="font-semibold text-gray-800 mb-1">索引冲突</h4>
                                <p class="text-gray-600">恢复时注意索引命名冲突，可以通过重命名索引避免覆盖现有数据</p>
                            </div>
                        </li>
                    </ul>
                </div>
            </div>
        </div>
    </section>

    <!-- Footer -->
    <footer class="bg-gray-900 text-white py-12 px-4">
        <div class="container mx-auto max-w-5xl">
            <div class="text-center">
                <h3 class="text-xl font-bold mb-2">技术小馆</h3>
                <p class="text-gray-400 mb-6">Elasticsearch 技术解析与实践</p>
                <div class="flex justify-center">
                    <a href="http://www.yuque.com/jtostring" class="text-indigo-400 hover:text-indigo-300 transition duration-300 flex items-center">
                        <i class="fas fa-globe mr-2"></i>
                        http://www.yuque.com/jtostring
                    </a>
                </div>
            </div>
        </div>
    </footer>

    <script>
        mermaid.initialize({
            startOnLoad: true,
            theme: 'default',
            flowchart: {
                useMaxWidth: true,
                htmlLabels: true,
                curve: 'basis'
            },
            securityLevel: 'loose'
        });
        
        // 简单的滚动动画
        document.querySelectorAll('a[href^="#"]').forEach(anchor => {
            anchor.addEventListener('click', function (e) {
                e.preventDefault();
                
                document.querySelector(this.getAttribute('href')).scrollIntoView({
                    behavior: 'smooth'
                });
            });
        });
    </script>
</body>
</html>